<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddColumsToGoods extends Migration {
	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up() {
		Schema::table('goods', function (Blueprint $table) {
			$table->string('add_time', 50)->nullable()->comment('上架时间');
			$table->string('areaname', 100)->nullable()->comment('销售地区');
			$table->string('bindingname', 50)->nullable()->comment('装裱');
			$table->string('author', 50)->nullable()->comment('作者');
			$table->string('press', 100)->nullable()->comment('出版社');
			$table->string('shopname', 100)->nullable()->comment('店铺名');
			$table->string('isbn', 20)->nullable()->comment('isbn');
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down() {
		Schema::table('goods', function (Blueprint $table) {
			$table->dropColumn(['add_time', 'areaname', 'bindingname', 'author', 'press', 'shopname', 'isbn']);
		});
	}
}
